Skip to content

Instantly share code, notes, and snippets.

@appkr
appkr / AddressRefiner.java
Last active May 21, 2024 14:32
주소정제기 초벌
package com.vroong.neogeo.support.address.refiner;
import static com.vroong.neogeo.domain.AdditionalInfo.*;
import static com.vroong.neogeo.domain.RegionType.*;
import static com.vroong.neogeo.support.address.Regex.*;
import com.vroong.neogeo.domain.AddressEntry;
import com.vroong.neogeo.domain.AddressEntry.AddressEntryBuilder;
import com.vroong.neogeo.domain.Refinable;
import com.vroong.neogeo.support.address.Regex;
Asynchronous Request/Response in Our Application
This document provides a step-by-step guide on how to implement asynchronous request/response in our application. The process involves changes in both the backend and frontend.
Backend
Step 1: Include AsyncRequestHandler
Include the AsyncRequestHandler concern in the intended controller where you want to enable asynchronous requests.
class EndUser::PearsonUserAssessmentsController < ApplicationController
include AsyncRequestHandler
end
@wojteklu
wojteklu / clean_code.md
Last active May 21, 2024 14:31
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

Edge Chromium

Note: If your system region is part of the EEA the option to uninstall Edge normally is rolling out in the latest updates for Windows and Edge. With some registry edits, you can change the region after install.

HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge, remove NoRemove.

HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdate\ClientState\{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}, delete experiment_control_labels if it exists.

Create HKLM\SOFTWARE\WOW6432Node\Microsoft\EdgeUpdateDev and add the AllowUninstall value. This replaces the experiment_control_labels blocker on later versions of Edge.

@senjacob
senjacob / ColumnAttributeTypeMapper.cs
Last active May 21, 2024 14:28 — forked from kalebpederson/ColumnAttributeTypeMapper.cs
Map column names with class properties in Dapper-dot-net using ITypeMap and CustomAttributes
namespace YourNamespace
{
/// <summary>
/// Uses the Name value of the ColumnAttribute specified, otherwise maps as usual.
/// </summary>
/// <typeparam name="T">The type of the object that this mapper applies to.</typeparam>
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper
{
public static readonly string ColumnAttributeName = "ColumnAttribute";
@arcadefire
arcadefire / bottomsheet.kt
Created September 12, 2021 12:50
Bottom sheet
enum class States {
EXPANDED,
COLLAPSED
}
@ExperimentalMaterialApi
@Composable
fun FullHeightBottomSheet(
header: @Composable () -> Unit,
body: @Composable () -> Unit
@ju2wheels
ju2wheels / package.json
Created June 4, 2015 03:49
npm package.json template for quickly creating a Node.js package with all options visible at a glance with comments
{
// WARNING: This file needs to be pure JSON, be sure to remove all comments
//
//====================================
// The "author" is one person. A "person" is an object with a "name" field and optionally
// "url" and "email" (both email and url are optional).
//
// This field can also be shortened to a single string that npm will parse.
//
//"author": "FirstName LastName <dev@company.com> (http://www.company.com)",
@phpclub
phpclub / README.md
Last active May 21, 2024 14:24 — forked from lcrilly/README.md
Prometheus exporter for NGINX Unit metrics

Prometheus exporter for NGINX Unit metrics

The NGINX Unit control API includes a /status endpoint for usage statistics. This is a solution for exposing these metrics in Prometheus format.

The application (run by Unit) queries the /status URI on the control socket and converts the JSON response into Prometheus text format. PHP and Python implementations are available.

These instructions assume an existing Unit installation with a working configuration. We will add a new listener on the default prometheus port (9090) and route it directly to the Prometheus app.

Step 0. Install the preferred Unit language module (unit-php or unit-python)

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@EvanBacon
EvanBacon / apple-touch-startup-image.html
Created April 17, 2019 07:10
An example of full iOS PWA startup image (splash screen) support.
<html>
<head>
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-touch-fullscreen" content="yes" />
<meta name="apple-mobile-web-app-title" content="Expo" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link
rel="apple-touch-icon"
sizes="180x180"